label: Avoid creating new attribute list
authorBenjamin Otte <otte@redhat.com>
Tue, 4 Feb 2014 22:34:06 +0000 (23:34 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 5 Feb 2014 12:38:54 +0000 (13:38 +0100)
Only create an attribute list for merging if we actually need to merge.

This bug was introduced in 5230cfe805b8f0046896c029612180fc9d4cc5df

gtk/gtklabel.c

index 3a6422cb9504fc802681820ef70684df26a5333b..912342767e859e7d64bfa3cbb04263dd83ee0058 100644 (file)
@@ -3361,7 +3361,7 @@ gtk_label_ensure_layout (GtkLabel *label)
               pango_attr_list_insert (attrs, attribute);
             }
         }
-      else if (priv->markup_attrs || priv->attrs)
+      else if (priv->markup_attrs && priv->attrs)
         attrs = pango_attr_list_new ();
       else
         attrs = NULL;